package com.Xingcang_Dianxue.WhutBank.Models;

import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;


public class Client {
    private final StringProperty userName;
    private final StringProperty phoneNumber;
    private final ObjectProperty<CheckingAccount> checkingAccount;

    private final StringProperty dateCreated;

    public Client() {
        this.userName = new SimpleStringProperty(this, "userName", "");
        this.phoneNumber = new SimpleStringProperty(this, "phoneNumber", "");
        this.checkingAccount = new SimpleObjectProperty<>(this, "checkingAccount", null);
        this.dateCreated = new SimpleStringProperty(this, "dateCreated", "");
    }

    public Client(String userName, String phoneNumber, CheckingAccount checkingAccount, String dateCreated) {
        this.userName = new SimpleStringProperty(this, "userName", userName);
        this.phoneNumber = new SimpleStringProperty(this, "phoneNumber", phoneNumber);
        this.checkingAccount = new SimpleObjectProperty<>(this, "checkingAccount", checkingAccount);
        this.dateCreated = new SimpleStringProperty(this, "dateCreated", dateCreated);
    }

    public String getUserName() {
        return userName.get();
    }

    public void setUserName(String userName) {
        this.userName.set(userName);
    }

    public StringProperty userNameProperty() {
        return userName;
    }

    public String getPhoneNumber() {
        return phoneNumber.get();
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber.set(phoneNumber);
    }

    public StringProperty phoneNumberProperty() {
        return phoneNumber;
    }

    public CheckingAccount getCheckingAccount() {
        return checkingAccount.get();
    }

    public void setCheckingAccount(CheckingAccount checkingAccount) {
        this.checkingAccount.set(checkingAccount);
    }

    public ObjectProperty<CheckingAccount> checkingAccountProperty() {
        return checkingAccount;
    }

    public String getDateCreated() {
        return dateCreated.get();
    }

    public void setDateCreated(String dateCreated) {
        this.dateCreated.set(dateCreated);
    }

    public StringProperty dateCreatedProperty() {
        return dateCreated;
    }
}
